home *** CD-ROM | disk | FTP | other *** search
/ Collection of Tools & Utilities / Collection of Tools and Utilities.iso / dirut / dosdir21.zip / EXAMPLE2.C < prev    next >
C/C++ Source or Header  |  1994-06-21  |  470b  |  22 lines

  1. /*
  2.  *  EXAMPLE2.C - Example program uses dosdir directory functions
  3.  *
  4.  *  Modification history:
  5.  *   V1.0  9-Jun-94, J Mathews  Original version.
  6.  */
  7.  
  8. #include "dosdir.h"
  9.  
  10. void main( int argc, char** argv)
  11. {
  12.   dd_ffblk fb;
  13.   char *mask = (argc == 1) ? ALL_FILES_MASK : argv[1];
  14.   printf("Directory of %s\n", mask);
  15.   if (!dd_findfirst( mask, &fb, DD_DIREC ))
  16.   {
  17.     do {
  18.          printf("%s\n", fb.dd_name);
  19.     } while (!dd_findnext(&fb));
  20.   }
  21. }
  22.